﻿#include "Configuration.h"

bool Configuration::Have(const std::string& name) const
{
  return HaveInSelf(name) || HaveInParser(name);
}

bool Configuration::HaveInSelf(const std::string& name) const
{
  return _parameters.find(name) != _parameters.end();
}

bool Configuration::HaveInParser(const std::string& name) const
{
  if (HaveInSelf("_parser"))
  {
    
    Parser* parser = linb::any_cast<Parser*>(_parameters.at("_parser"));
    return parser->Have(name);
  }
  return false;
}
